package org.xlh.springboot;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@Slf4j //lombok的日志注解，为我们维护一个日志对象 log
@SpringBootApplication
public class Springboot325LogApplication {

	public static void main(String[] args) {
		SpringApplication.run(Springboot325LogApplication.class, args);

		while (true) {
			//直接使用lombok的日志对象log记录日志
			log.trace("这是main的trace日志");
			log.info("这是main的info日志");
			log.debug("这是main的debug日志");
			log.warn("这是main的warn日志");
			log.error("这是main的error日志");
            try {
                Thread.sleep(30);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
        }
	}
}
